let Mock = require("mockjs");

function getClassificationList() {
    var classificationList=[
        {
            "id":0,
            "name":'蔬菜豆制品'
        },
        {
            "id":1,
            "name":'肉禽蛋'
        },
        {
            "id":2,
            "name":'水产海鲜'
        },
        {
            "id":3,
            "name":'水果鲜花'
        },
        {
            "id":4,
            "name":'乳品烘焙'
        },
        {
            "id":5,
            "name":'冷冻食品'
        },
        {
            "id":6,
            "name":'粮油调味'
        },
        {
            "id":7,
            "name":'方便速食'
        },
        {
            "id":8,
            "name":'快手菜'
        },
        {
            "id":9,
            "name":'火锅到家'
        },
        {
            "id":10,
            "name":'网红打卡地'
        },
        {
            "id":11,
            "name":'零食酒饮'
        },
        {
            "id":12,
            "name":'营养早餐'
        },
        {
            "id":13,
            "name":'鲜花宠物'
        },
        {
            "id":14,
            "name":'熟食卤味'
        },
        {
            "id":15,
            "name":'日日鲜'
        },
        {
            "id":16,
            "name":'年货节'
        },
        {
            "id":17,
            "name":'厨房用品'
        },
        {
            "id":18,
            "name":'绿卡专享'
        },
    ]
    var title = Mock.Random.cword(2, 4);
    var data = Mock.mock({
        'data|1-10':[{

            "id|+1": 1,
        }]
    });

    var list=Mock.mock({
        'rightList|1-10':[{
            "id|+1": 1,
            "price|1-100.1-2": 1,
            "vipPrice|1-100.1-2": 1,
            image:Mock.Random.image("200x200"),
        }]
    });
    var descriptionList=Mock.mock({
        'description|1-3':[{
            "id|+1": 1,
        }]
    });
    for (var i=0;i<data.data.length;i++){
        data.data[i].title=Mock.Random.cword(2, 4)
        data.data[i].rightList=list.rightList
    }
    for (var i=0;i<descriptionList.description.length;i++){
        descriptionList.description[i].description=Mock.Random.cword(3, 4)
    }
    for (var i=0;i<list.rightList.length;i++){
        list.rightList[i].title=Mock.Random.cword(10, 20)
        list.rightList[i].description=descriptionList.description
    }


    for (var i=0;i<classificationList.length;i++){
        classificationList[i].cartImage= Mock.Random.image('200x100', '#02adea', 'Hello')
        classificationList[i].tabList=data.data
    }
    return { classificationList };
}
module.exports = getClassificationList;

